
/* 
 * This file is part of FreeBMS - an open source battery management system
 *
 * EEPROM Location Headers
 * 
 * NOTE: This code is designed to be compiled using SOURCEBOOST (http://www.sourceboost.com)
 */
 
/* This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
#ifndef _EEPROM_H_
#define _EEPROM_H_

// EEPROM Defines
#define EEPROM_CODE_REVISION	0x00
#define EEPROM_REG_ADCDELAY		0x01
#define EEPROM_REG_LEDMODE		0x02
#define EEPROM_REG_STIMER_HI	0x03
#define EEPROM_REG_STIMER_LO	0x04
#define EEPROM_REG_MAXVOLT_HI	0x05
#define EEPROM_REG_MAXVOLT_LO	0x06
#define EEPROM_NUMCELLS			0x07
#define EEPROM_BAUDRATE			0x08
#define EEPROM_SHUNTING			0x09
#define EEPROM_SOC				0x0A
#define EEPROM_DIFFVOLT_HI		0x0B
#define EEPROM_DIFFVOLT_LO		0x0C
#define EEPROM_MINVOLT_HI		0x0D
#define EEPROM_MINVOLT_LO		0x0E
#define EEPROM_MAXVOLT_HI		0x0F
#define EEPROM_MAXVOLT_LO		0x10
#define EEPROM_BALVOLT_HI		0x11
#define EEPROM_BALVOLT_LO		0x12
#define EEPROM_TIMERPAUSE_HI	0x13
#define EEPROM_TIMERPAUSE_LO	0x14
#define EEPROM_TIMERSHUNT_HI	0x15
#define EEPROM_TIMERSHUNT_LO	0x16
#define EEPROM_AMPERE_ERR_HI	0x17
#define EEPROM_AMPERE_ERR_LO	0x18
#define EEPROM_AMPERE_CUR_B0	0x19
#define EEPROM_AMPERE_CUR_B1	0x1A
#define EEPROM_AMPERE_CUR_B2	0x1B
#define EEPROM_AMPERE_CUR_B3	0x1C
#define EEPROM_AMPERE_FULL_B0	0x1D
#define EEPROM_AMPERE_FULL_B1	0x1E
#define EEPROM_AMPERE_FULL_B2	0x1F
#define EEPROM_AMPERE_FULL_B3	0x20
#define EEPROM_AMPERE_EMPTY_B0	0x21
#define EEPROM_AMPERE_EMPTY_B1	0x22
#define EEPROM_AMPERE_EMPTY_B2	0x23
#define EEPROM_AMPERE_EMPTY_B3	0x24

// EEPROM defines for broadcast messages
#define EEPROM_100MS1_START		0x60
#define EEPROM_100MS2_START		0x68
#define EEPROM_50MS1_START		0x70

// EEPROM defines for DTC storage
#define EEPROM_DTC_NUM			0x90		// Number of DTCs in EEPROM
#define EEPROM_DTC_START		0x91		// Start of DTC storage

#endif // _EEPROM_H_
